package com.ruoyi.web.core.service;

import com.ruoyi.net.constant.UdpConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import oshi.util.Util;

import java.net.DatagramPacket;
import java.net.DatagramSocket;

@Component
public class SpnUdpReceiver {
    @Autowired
    private DatagramSocket socket;

    @Autowired
    private UdpService udpService;

    public void startReceiver() {
        udpService.receiveData(socket);
    }
}